package com.example.api.mall.logic;

import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

@Transactional
public interface IFileLogic {

    /**
     * 上传文件
     * @param file
     * @return
     */
    String upload(MultipartFile file);

    /**
     * 上传多个文件
     * @param files
     * @return
     */
    List<String> uploads(MultipartFile[] files);

    /**
     * 上传到minio
     * @param file
     * @return
     * @throws Exception
     */
    String uploadToMinio(MultipartFile file) throws Exception;


}
